package com.andkrup.easygame.game.commands {

	/**
	 * @author Andkrup
	 * 
	 * IGameCommands are an abstraction of a user-invoked action. In every game,
	 * the press (and release) of a button or a flick or click of the mouse is
	 * synonymous with an action that either the game must respond to, or the
	 * overall user-interface.
	 * 
	 * Some IGameCommands invokes actions "inside" the game, as in shooting with
	 * the SPACE key. Other IGameCommands controls "outside" actions in the ui,
	 * as in the ESC key aborts the game and displays a GameMenu.
	 * 
	 * Abstracting these actions enables easy user-customization.
	 * 
	 * Property 'code' is intended to be understood as characterCodes (ascii)
	 * when positive and user-speciific (suggesting mouse-gestures and aliases,
	 * defined by user in a console, when negative
	 */
	public interface IGameCommand {
		function get code():String;
		function set code(value:String):void;
		function get eventType():String;
		function set eventType(value:String):void;
		function equals(command:IGameCommand):Boolean;
		function execute():void;
	}
}
